#include<iostream.h>
#ifndef comFinal_h
#define comFinal_h

class comFinal
{
	friend	ostream &operator<<( ostream &os,  comFinal &s);
	//friend void show(comFinal &st);
protected:
	char name[20];
	int English, Chinese,Math,Total;
	float average;

public:
	comFinal(char *n,int Eng,int Chi,int Mat);
	comFinal(){};
	~comFinal(){};
	char *getName()
	{
		return name;
	}
	int getEng()
	{
		return English;
	}
	int getChi()
	{
		return Chinese;
	}
	int getMat()
	{
		return Math;
	}
	void setEng(int x)
	{
		English=x;
	}
	void setChi(int x)
	{
		Chinese=x;
	}
	void setMat(int x)
	{
		Math=x;
	}
	virtual	int getTotal()
	{
		return English+Chinese+Math;
	}
	float getAverage()
	{
		return (float)((English+Chinese+Math) / 3);
	}
	virtual	void show();

	
};
#endif